home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Essential Home & Business Collection
/
The Essential Home & Business Collection.iso
/
27
/
3
/
5
/
HP22D5.ZIP
/
EXTERN
/
BLINK.ASM
< prev
next >
Wrap
Assembly Source File
|
1991-04-16
|
1KB
|
78 lines
DOSSEG
.MODEL LARGE
include extern.inc
EXTRN GetSharedArea:FAR
.DATA
BlinkOffName db 'blinkoff',0
BlinkOnName db 'blinkon',0
Pool PoolStruct <BlinkOffName,blinkoff,,HANDLER>
PoolStruct <BlinkOnName,blinkon,,HANDLER>
PoolStruct <> ;END
.CODE
WhenLoaded: retf
setblink:
push cx
call GetSharedArea ;DX:AX = pointer to shared area
pop cx
mov es,dx
mov bx,ax ;ES:BX = pointer to shared area
mov al,es:[bx+502] ;AL = video card type:
; 00 Monochrome
; 01 CGA
; 02 Extended CGA
; 03 Extended CGA - PLASMA
; 04 Hercules Monochrome
; 05 EGA
; 06 Extended EGA
; 07 MCGA
; 08 VGA
; 09 Extended VGA
; 10 Leadning EDGE Internal Graphics Adapter
; 11 Unknown
cmp al,5
jl CGAMONO
cmp al,10
jl EGAVGA
CGAMONO:
mov ax,0040h
mov es,ax ;ES = BIOS data segment
mov dx,es:[63h] ;DX = address of 6845
add dl,4 ;DL = crt mode control register
mov al,es:[65h] ;AL = value of crt mode ctrl
and al,11011111b ;zero bit 5 (blink)
or al,ch
out dx,al
mov es:[65h],al ;update BIOS info
mov ax,STOP
retf
EGAVGA:
mov bl,cl
mov ax,1003h
int 10h
mov ax,STOP
retf
blinkoff:
xor cx,cx
jmp short setblink
blinkon:
mov cx,2001h
jmp short setblink
END